home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 July to December / Ahoy_Magazine_84-Jul-Dec_1984_Double_L_unofficial.d64 / lawn job (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  4KB  |  135 lines

  1. 10 rem lawn job - mike buhidar jr.
  2. 16 goto11000
  3. 17 dimp(15):p(1)=-40:p(2)=40:p(4)=-1:p(8)=1
  4. 20 rn=0:sc=0:co=54272:hc=0:gosub2000:gosub200:ti$="000000":gosub300
  5. 120 bo=128:bc=13:pe=peek(56320):jv=15-(peand15)
  6. 125 ifp=5thensc=sc+.050001:sc$=str$(sc):sc$=mid$(sc$,2,4)
  7. 127 printtab(10);sc$;tab(32);mid$(ti$,3,2)":";right$(ti$,2)"[145]"
  8. 130 pp=op+p(jv):dn=peek(pp):p=peek(pp+co)and15:ifdn<>128then400
  9. 137 ifjv=0orjv=5orjv=6orjv=9orjv=10then120
  10. 140 pokeop,io:pokeop+co,ic:pokepp+co,1:pokepp,jv+130:op=pp
  11. 145 io=bo:ic=bc
  12. 150 goto120
  13. 200 rem sound init.
  14. 203 op=1843:pokeop,131:pokeop+co,1:io=32:ic=1
  15. 210 s=54272:fora=stos+24:pokea,0:next:pokes+24,15:pokes+5,63:pokes+6,255
  16. 220 pokes+4,65:pokes+3,10:pokes+2,255:return
  17. 300 rem start mower
  18. 305 print""tab(32);mid$(ti$,3,2)":"right$(ti$,2):print"[145][145]"
  19. 310 jv=peek(56320):fr=(jvand16):forit=0to250:next:iffr=16then305
  20. 315 yn=int(rnd(1)*6)+1:ifyn=1then340
  21. 320 fortt=2to0step-1:pokes+1,tt:forbb=255to0step-5:pokes,bb:pokes,0:next:next
  22. 330 pokes+1,0:goto305
  23. 340 forcc=1to3:pokes+1,cc:forhh=0to100:next:next:return
  24. 400 rem collision
  25. 410 ifdn=130then500
  26. 420 ifdn=129then520
  27. 430 ifdn=133and(peand16)<>16then540
  28. 450 goto120
  29. 500 rem hit rock
  30. 505 forbc=15to0step-1:poke53280,bc:next
  31. 510 pokeop,jv+130:forb=4to0step-.05:pokes+1,b:next:rn=rn+1:gosub300:goto120
  32. 520 rem walk on sidewalk
  33. 530 bo=129:bc=15:goto137
  34. 540 rem check for complete job
  35. 545 ll=0:print"[145][145][145]         looking over your work."
  36. 546 forgg=1to0:pokes+1,gg:foryy=255to0step-1:pokes,yy:next:next:pokes+1,0
  37. 550 forv=1024to2023:pv=peek(v+co)and15:gosub560:next
  38. 552 ifll=mmthen600
  39. 555 print"[145]     you have not finished the job!"
  40. 556 forg=0to3000:next:print"[145]                                       "
  41. 558 gosub300:goto120
  42. 560 ifpv=5thenll=ll+1
  43. 570 return
  44. 600 rem end of game
  45. 605 fs=val(sc$)-val(ti$)/100-.50*rn:iffs>hsthenhs=fs
  46. 610 pokes+1,0:poke53281,0:print"[147]"
  47. 615 iffs<0then700
  48. 620 printtab(6)"great job, you earned $";fs
  49. 625 print:printtab(10)"highest earning $";hs
  50. 630 print"[159]";:printtab(8)"press trigger to play again"
  51. 640 aa=peek(56320)and16:ifaa=0then20
  52. 650 goto640
  53. 700 print"[145] your expenses outweighed your earning!"
  54. 710 printtab(5)"find another way to earn money!":goto630
  55. 2000 rem initialazation of screen
  56. 2003 poke53281,0:poke53280,0:poke53265,peek(53265)and239
  57. 2005 print"[147]":printtab(2)"score:  0"tab(25)"time:  ";
  58. 2010 poke53281,5:poke53280,0:poke53281,9
  59. 2015 forb5=1464to1783:pokeb5,128:pokeb5+co,5:next
  60. 2016 forc2=1247to1447step40:pokec2,128:pokec2+co,5:next
  61. 2017 forc3=1248to1448step40:pokec3,128:pokec3+co,5:next
  62. 2018 forc4=1249to1449step40:pokec4,128:pokec4+co,5:next
  63. 2019 forc5=1250to1450step40:pokec5,128:pokec5+co,5:next
  64. 2020 forc6=1310to1326:pokec6,128:pokec6+co,5:next
  65. 2021 forc7=1350to1366:pokec7,128:pokec7+co,5:next
  66. 2022 forc8=1390to1406:pokec8,128:pokec8+co,5:next
  67. 2023 forc9=1430to1446:pokec9,128:pokec9+co,5:next
  68. 2029 fora1=1864to1903:pokea1,69:pokea1+co,0:next
  69. 2030 fora2=1784to1823:pokea2,129:pokea2+co,15:next
  70. 2040 fora3=1323to1801step40:pokea3,129:pokea3+co,15:next
  71. 2050 fora4=1324to1328:pokea4,129:pokea4+co,15:next
  72. 2060 poke1288,129:poke1288+co,15:forz1=1247to1250:pokez1,133:pokez1+co,12:next
  73. 2070 fora5=1028to1148step40:pokea5,116:pokea5+co,hc:next
  74. 2080 poke1188,76:poke1188+co,hc
  75. 2090 fora6=1189to1210:pokea6,111:pokea6+co,hc:next
  76. 3000 fora7=1251to1451step40:pokea7,116:pokea7+co,hc:next
  77. 3010 fora8=1211to1055step-39:pokea8,78:pokea8+co,hc:next
  78. 3020 fora9=1492to1499:pokea9,111:pokea9+co,hc:next
  79. 3030 poke1491,76:poke1491+co,hc:poke1496,76:poke1496+co,hc
  80. 3040 forb1=1056to1456step40:pokeb1,116:pokeb1+co,hc:next
  81. 3050 poke1500,122:poke1500+co,hc
  82. 3060 forb2=1060to1460step40:pokeb2,106:pokeb2+co,hc:next
  83. 3070 forb3=1271to1285:pokeb3,67:pokeb3+co,12:next
  84. 3080 poke1270,74:poke1270+co,12:poke1286,75:poke1286+co,12
  85. 3090 poke1230,93:poke1230+co,12:poke1246,93:poke1246+co,12
  86. 3100 forb4=1231to1245step2:pokeb4,135:pokeb4+co,7:next
  87. 3110 forb6=1024to1424step40:pokeb6,128:pokeb6+co,5:next
  88. 3120 forb7=1025to1425step40:pokeb7,128:pokeb7+co,5:next
  89. 3130 forb8=1026to1426step40:pokeb8,128:pokeb8+co,5:next
  90. 3140 forb9=1027to1427step40:pokeb9,128:pokeb9+co,5:next
  91. 3150 forb9=1228to1428step40:pokeb9,128:pokeb9+co,5:next
  92. 3160 forc1=1229to1429step40:pokec1,128:pokec1+co,5:next
  93. 3170 ford1=1061to1461step40:poked1,128:poked1+co,5:next
  94. 3180 ford2=1062to1462step40:poked2,128:poked2+co,5:next
  95. 3190 ford3=1063to1463step40:poked3,128:poked3+co,5:next
  96. 3195 fore1=1024to1744step40:pokee1,72:pokee1+co,1:next
  97. 3197 fore2=1063to1783step40:pokee2,71:pokee2+co,1:next
  98. 3199 mm=int(rnd(1)*10)+10
  99. 3200 fortt=1tomm
  100. 3210 rp=int(rnd(1)*1000)+1024
  101. 3220 ifpeek(rp)<>128then3210
  102. 3221 ifpeek(rp-1)=130then3210
  103. 3222 ifpeek(rp+1)=130then3210
  104. 3223 ifpeek(rp+39)=130then3210
  105. 3224 ifpeek(rp+41)=130then3210
  106. 3225 ifpeek(rp-41)=130then3210
  107. 3226 ifpeek(rp-39)=130then3210
  108. 3230 pokerp,130:nexttt
  109. 4000 poke53265,peek(53265)or16
  110. 9999 return
  111. 11000 rem redefine characters
  112. 11001 ifpeek(12288)=60then11045
  113. 11004 poke53280,0:poke53281,0:print"[147]"
  114. 11005 printtab(16)"[153]lawn job":printtab(19)"by"
  115. 11006 printtab(12)"mike buhidar jr."
  116. 11007 print"[159]redefining characters, please wait..."
  117. 11010 printchr$(142):poke52,48:poke56,48:clr:poke56334,peek(56334)and254
  118. 11020 poke1,peek(1)and251
  119. 11025 forch=0to1023:pokech+12288,peek(ch+53248):next
  120. 11030 forcd=0to87:readd:pokecd+13312,d:next
  121. 11040 poke1,peek(1)or4:poke56334,peek(56334)or1
  122. 11045 poke53272,(peek(53272)and240)+12
  123. 11050 goto17
  124. 12000 rem data for characters
  125. 12010 data173,255,219,254,183,253,111,255
  126. 12020 data255,255,255,255,255,255,255,255
  127. 12030 data255,239,231,227,195,193,126,255
  128. 12040 data255,231,231,189,36,126,102,60
  129. 12050 data60,102,126,36,189,231,231,255
  130. 12060 data255,255,255,255,255,255,255,255
  131. 12070 data240,230,255,149,149,255,230,240
  132. 12080 data0,28,54,28,8,42,28,0
  133. 12090 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  134. 12110 data15,103,255,169,169,255,103,15
  135.